<template>
  <a-modal
    class="upload-preview-wrap"
    centered
    :visible="previewVisible"
    :footer="null"
    :closable="false"
    @cancel="handleCancel"
  >
    <img alt="example" style="width: 100%" :src="previewImage" />
  </a-modal>
</template>

<script>
export default {
  data() {
    return {
      previewVisible: false, // 附图弹窗开关
      previewImage: '' // 附图url
    }
  },
  methods: {
    // 展示
    showPreViewMedia(url) {
      this.previewVisible = true
      this.previewImage = url
    },
    handleCancel() {
      this.previewVisible = false
      this.previewImage = ''
    }
  }
}
</script>
